package com.qiche.controller.wx;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import com.qiche.aspect.Result;
import com.qiche.model.StoreMember;
import com.qiche.service.LuckyDrawService;

/**
 * @author LB
 *
 * @date 2018年7月14日
 */
@RestController
@RequestMapping("wx/luckyDraw")
public class LuckyDrawWxController {
	
	@Autowired
	public LuckyDrawService luckyDrawService;
	
	@PostMapping("/getLuckyDraw")
	public Result<?> luckyDraw(@RequestParam String accessToken, @RequestParam String openid, String unionid,
			@RequestParam Long merchantId, StoreMember storeMember,Integer ifLuckyDraw) throws Exception{
		return luckyDrawService.luckyDraw(merchantId, storeMember,ifLuckyDraw);
	}

}
